package com.symaster.common.connect.v3;

import com.symaster.common.connect.v3.socket.TcpServer;

/**
 * @author yinmiao
 * @version 2024/1/1
 */
public class Server {

    private final TcpServer tcpServer;

    public Server(TcpServer tcpServer) {
        this.tcpServer = tcpServer;
        // initAcceptListener();
    }

    // private void initAcceptListener() {
    //     tcpServer.setAcceptListener(socket -> {
    //         new Thread(() -> {
    //             byte[] bytes = new byte[SocketUtil.limit];
    //
    //             while (tcpServer.isRun()) {
    //                 int read = socket.getInputStream().read(bytes);
    //                 if (read > 0) {
    //                     receive(bytes, 0, read);
    //                 }
    //             }
    //         })
    //     });
    // }

    // public void receive(byte[] bytes, ) {
    //
    // }


    public static void main(String[] args) {

    }
}
